package example;

import javafx.util.Builder;

public class Student {
    private String name;

    private Integer age;

    private Double height;

    private Double weight;

    private Student(BuilderStundent builder){
        this.name=builder.name;
        this.age=builder.age;
        this.height=builder.height;
        this.weight=builder.weight;
    }

    public static BuilderStundent builderStundent(){
        return new BuilderStundent();
    }

    public  static  final class  BuilderStundent{
        private String name;

        private Integer age;

        private Double height;

        private Double weight;

        public  Student build(){
            return new Student(this);
        }

        public BuilderStundent buildName(String name){
            this.name=name;
            return this;
        }

        public BuilderStundent buildAge(Integer age){
            this.age=age;
            return this;
        }

        public BuilderStundent buildHeight(Double height){
            this.height=height;
            return this;
        }


        public BuilderStundent buildName(Double weight){
            this.weight=weight;
            return this;
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }
}
